﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MVCPets.Extensions
{
  public static class StringbuilderExtensions
  {
    public static void AppendServerDetails(this StringBuilder sb)
    {
      sb.Append("---- Server Information -----<br />").AppendLine();
      sb.AppendFormat("Server Name: {0}<br />", Environment.MachineName).AppendLine();
      sb.AppendFormat("OS Version: {0}<br />", Environment.OSVersion).AppendLine();
      sb.AppendFormat("Time: {0}<br />", DateTime.Now.ToShortTimeString()).AppendLine();
      sb.AppendFormat("Date: {0}<br />", DateTime.Now.ToShortDateString()).AppendLine();
      sb.AppendFormat("CLR: {0}<br />", Environment.Version).AppendLine();
      sb.AppendFormat("Current Memory Usage: {0}<br />", Environment.WorkingSet);
    }
  }
}
